//
//  CATiledLayer.swift
//  Documentation
//
//  Created by Toj on 3/8/24.
//
// 使用CATiledLayer解决加载大图的问题。
// https://www.jianshu.com/p/20d35b51a9a1
// https://www.kancloud.cn/manual/ios/97766

@available(iOS 2.0, *)
open class CATiledLayer : CALayer {

    
    /* The time in seconds that newly added images take to "fade-in" to the
     * rendered representation of the tiled layer. The default implementation
     * returns 0.25 seconds. */
    
    open class func fadeDuration() -> CFTimeInterval

    
    /* The number of levels of detail maintained by this layer. Defaults to
     * one. Each LOD is half the resolution of the previous level. If too
     * many levels are specified for the current size of the layer, then
     * the number of levels is clamped to the maximum value (the bottom
     * most LOD must contain at least a single pixel in each dimension). */
    
    open var levelsOfDetail: Int

    
    /* The number of magnified levels of detail for this layer. Defaults to
     * zero. Each previous level of detail is twice the resolution of the
     * later. E.g. specifying 'levelsOfDetailBias' of two means that the
     * layer devotes two of its specified levels of detail to
     * magnification, i.e. 2x and 4x. */
    
    open var levelsOfDetailBias: Int

    
    /* The maximum size of each tile used to create the layer's content.
     * Defaults to (256, 256). Note that there is a maximum tile size, and
     * requests for tiles larger than that limit will cause a suitable
     * value to be substituted. */
    
    open var tileSize: CGSize
}
